﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DotNet.Business;

public partial class caseDetail : System.Web.UI.Page
{
    #region 变量
    Tab_CaseBll tab_CaseBll = new Tab_CaseBll();
    Tab_CaseClassBll tab_CaseClassBll = new Tab_CaseClassBll();
    /// <summary>
    /// 方案ID
    /// </summary>
    int _id = 0;
    /// <summary>
    /// 方案名称
    /// </summary>
    public string _caseName = "";
    /// <summary>
    /// 方案类别名称
    /// </summary>
    public string _caseClassName = "";
    /// <summary>
    /// 方案类别ID
    /// </summary>
    public int _caseClassID = 0;
    /// <summary>
    /// 方案图片地址
    /// </summary>
    public string _imgUrl = "";
    /// <summary>
    /// 方案详细内容
    /// </summary>
    public string _info = "";
    #endregion

    #region 加载页面 
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["id"]!=null)
            {
                this._id = Convert.ToInt32(Request.QueryString["id"]);
                //绑定方案详细
                this.bindCase();
            }
        }
    }
    #endregion

    #region 绑定方案详细
    /// <summary>
    /// 绑定方案详细
    /// </summary>
    private void bindCase() 
    {
        Tab_Case tab_Case = new Tab_Case();
        tab_Case = tab_CaseBll.GetModel(this._id);
        this._id = tab_Case.caseID;
        this._caseName = tab_Case.caseName;
        this._imgUrl = tab_Case.caseImgUrl;
        this._caseClassID = tab_Case.caseClassID;
        this._info = tab_Case.caseInfo;
        Tab_CaseClass tab_CaseClass = new Tab_CaseClass();
        tab_CaseClass=tab_CaseClassBll.GetModel(tab_Case.caseClassID);
        this._caseClassName = tab_CaseClass.caseClassName;
    }
    #endregion
}
